package org.yn.shopping.mapper;

import org.yn.base.mapper.IBaseMapper;
import org.yn.shopping.domain.ShoppingCart;
import org.yn.shopping.vo.ShoppingCartVO;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author yn
 * @since 2023-08-30
 */
public interface ShoppingCartMapper extends IBaseMapper<ShoppingCart> {

    ShoppingCart selectByCarId(Long carId);

    List<ShoppingCartVO> getShoppingCartByUserId(Long userId);

    void deleteByCarId(Long carId);

    void deleteAllByUserId(Long userId);

    ShoppingCart selectByUserId(Long userId);

    Integer countByUserId(Long userId);
}
